<template>
  <div class="sms cen">
    <back title="短信"></back>
    <li flex="cross:center main:justify" style="width: 92%;margin: 0.2rem auto;">
      <span flex="cross:center" style="width:6.5rem">
        <img src="https://picsum.photos/id/1/100/100" width="15">
        <input type='text' v-model="form.phone" style="height:0.6rem;margin-left: 0.1rem;padding: 0 8px;" flex-box="1">
      </span>
      <sms :getCode="getCode"></sms>
    </li>
    <foot :active="1" />
  </div>
</template>

<script>
import Sms from '@/components/Sms'
import verify from '@/utils/verify'

export default {
  name: 'message',
  data () {
    return{
      form:{
        phone:''
      },
      getCode:()=>{
        if(this.$trim(this.form.phone)==''){
          alert('手机号码为空')
          return false
        }
        if(!verify.phone(this.form.phone)){
          alert('手机号码不正确')
          return false
        }
        return true
      }
    }
  },
  components:{
    Sms
  },
  methods:{
    
  },
  mounted(){
    
  }
}
</script>

<style lang="less" scoped>
  
</style>